/**
 * @file vofa.c
 * @brief 
 * 
 * @author dalin (dalin@open-robot.com)
 * @version 1.0
 * @date 2023-05-18
 * 
 * @copyright Copyright (c) 2023  Open Robot Tech.co, Ltd
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2023-05-18 <td>1.0     <td>yangsl     <td>Init
 * </table>
 */

#include "vofa.h"
#include "cmsis_os.h"


justFloat_t vofa_frame = {
	.tail[0] =  0x00,
	.tail[1] =  0x00,
	.tail[2] =  0x80,
	.tail[3] =  0x7f
};


/* 上传just_float格式数据 */
void vofa_upload(void * data, uint8_t len)
{
	uint8_t * buf = data;
    memcpy(&vofa_frame, buf, len);     
   
	drv_uart_dma_send(DEV_VOFA ,(uint8_t *)&vofa_frame.fdata[0] , len);    
	drv_uart_dma_send(DEV_VOFA ,(uint8_t *)&vofa_frame.tail[0]  , 4);      
}


void vofa_data_update(uint8_t * data, uint8_t len)
{
    memcpy(&vofa_frame, data, len);
}


/* 协议解析 */
static void vofa_parse_download(uint8_t *data_buf,uint8_t lens)
{  
	
}

